import time
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://news.sina.com.cn")
driver.execute_script('window.scrollTo(0, 10000)')
time.sleep(2)
driver.execute_script('window.scrollTo(0,0)')
driver.find_element_by_xpath('//*[@id="syncad_1"]/h1[1]/a').click()
time.sleep(2)
handles = driver.window_handles
driver.switch_to.window(handles[1])
driver.close()
time.sleep(1)
driver.switch_to.window(handles[0])
driver.close()